#include <timberyard/utils.h>
#include <inttypes.h>

namespace Timberyard {

// prettyprint pointers
std::ostream& PrintPointer_(std::ostream& o,const void* p) {
	const uintptr_t pi(reinterpret_cast<uintptr_t>(p));
	char phil=o.fill('0');
	std::streamsize wid(o.width(2*(sizeof(void*)+1)));
	std::ios_base::fmtflags stflag = o.flags();
	o<<std::showbase<<std::hex<<std::internal<<pi;
	o.flags(stflag);
	o.fill(phil);
	o.width(wid);
	return o;
}

} //namespace Timberyard
